<template>
	<view>
		<view class="page">
			<comp-common v-bind="{data:data}" @getUserInfo="getUserInfo" @myLogin="myLogin" @getPhoneNumber="getPhoneNumber" @hideGetCoupon="hideGetCoupon" @closeCouponBox="closeCouponBox" @navigatorClick="navigatorClick"></comp-common>
			<comp-header v-bind="{data:data}" @relevanceError="relevanceError" @relevanceSuccess="relevanceSuccess"></comp-header>
			<view class="body after-navber">
				
			</view>
			<comp-footer v-bind="{data:data}"></comp-footer>
		</view>
	</view>
</template>

<script>var myVue = {};
	export default {
		data() {
			return {
				data: {},
			};
		},
		onLoad: function(e) {myVue = this;
				var _this = this;
        myVue.getApp.page.onLoad(this, e);
        var t = myVue.getApp.getUser();
        this.setData({
            dapp: this.getApp.core.getStorageSync(myVue.getApp.const.STIRE),
            user_info: t
        });
        var o = "";
        if ("undefined" == typeof my) o = decodeURIComponent(e.scene); else if (null !== myVue.getApp.query) {
            var n = myVue.getApp.query;
            myVue.getApp.query = null, o = n.user_card_id;
        }
        myVue.getApp.core.showModal({
            title: "提示",
            content: "是否核销？",
            success: function(e) {
                e.confirm ? (myVue.getApp.core.showLoading({
                    title: "核销中"
                }), myVue.getApp.request({
                    url: myVue.getApp.api.user.card_clerk,
                    data: {
                        user_card_id: o
                    },
                    success: function(e) {
                        myVue.getApp.core.showModal({
                            title: "提示",
                            content: e.msg,
                            showCancel: !1,
                            success: function(e) {
                                e.confirm && myVue.getApp.core.redirectTo({
                                    url: "/pages/index/index"
                                });
                            }
                        });
                    },
                    complete: function() {
                        myVue.getApp.core.hideLoading();
                    }
                })) : e.cancel && myVue.getApp.core.redirectTo({
                    url: "/pages/index/index"
                });
            }
        });
    },
    onShow: function() {
        myVue.getApp.page.onShow(this);
    },
		methods: {
			
		},
	}
</script>

<style scoped>

</style>
